<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>设置数据（增加，修改）</title>
</head>
<body>

</body>
<script>
	// 1- storage分为localStorage,sessionStorage
	// 2- storage是window下的对象
	// console.log(window.localStorage)
	// console.log(window.sessionStorage)
	localStorage.userName = "zhangsan";
	localStorage["age"] = 100;
	localStorage.setItem("sex","男");// 建议使用的。
</script>
</html>